<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
            .parent{
               display: flex;
               width: 400px;
               background: red;
               /* 设置子元素是否换行 */
               flex-wrap: wrap;   
               /* justify-content: space-evenly;             */
            }
            .parent>div{
                width: 100px;
                height: 40px;
                background: yellow;
                border: 1px solid #333;
            }
    </style>
</head>
<body>
        <div class="parent">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
</body>
</html>